package cn.silver.module.system.controller;

import cn.silver.framework.mybatis.controller.TreeController;
import cn.silver.module.system.domain.SysMenu;
import cn.silver.module.system.bean.MenuBean;
import cn.silver.module.system.param.MenuParam;
import cn.silver.module.system.service.ISysMenuService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 菜单信息
 *
 * @author Silver Zhou
 */
@Validated
@RestController
@RequiredArgsConstructor
@Tag(name = "权限管理-菜单管理")
@RequestMapping("/system/menu")
public class SysMenuController extends TreeController<ISysMenuService, SysMenu, MenuParam, MenuBean> {
    @Override
    @Resource
    public void setBaseService(ISysMenuService baseService) {
        this.setTitle("权限管理-菜单管理");
        this.setCode("system_menu");
        this.setPermission("system:menu");
        this.baseService = baseService;
    }
}
